package com.hsmpay.mobile.service.user.impl;

import com.hsmpay.common.pojo.user.Loan;
import com.hsmpay.common.service.impl.MemcachedServiceSupport;
import com.hsmpay.mobile.dao.user.LoanDao;
import com.hsmpay.mobile.service.user.LoanService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 贷款业务实现类 loanService
 * 对应数据层 loanDao
 * Created by tenghui on 16/10/25.
 */
@Service("loanService")
public class LoanServiceImpl extends MemcachedServiceSupport<Loan, Long> implements LoanService<Loan,Long> {

    @Resource( name="loanDao" )
    private LoanDao<Loan,Long> loanDao;//贷款DAO

    /**
     * 插入一条贷款记录
     * @param loan
     * @return
     * @throws Exception
     */
    public Long insert(Loan loan) throws Exception {
        return loanDao.insertEntity(loan);
    }

}
